/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import { CustomRequestOptions_ } from '@/http/types';

import * as API from './types';

/** 添加好友 双方建立好友关系 POST /friend/add */
export function friendAddUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.FriendAddUsingPostParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/friend/add', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 删除好友 解除好友关系 DELETE /friend/delete/${param0} */
export function friendOpenApiDeleteFriendIdUsingDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.FriendOpenApiDeleteFriendIdUsingDeleteParams;
  options?: CustomRequestOptions_;
}) {
  const { friendId: param0, ...queryParams } = params;

  return request<API.Result>(`/friend/delete/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查找好友信息 查找好友信息 GET /friend/find/${param0} */
export function friendFindFriendIdUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.FriendFindFriendIdUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  const { friendId: param0, ...queryParams } = params;

  return request<API.ResultFriendVO>(`/friend/find/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 好友列表 获取好友列表 GET /friend/list */
export function friendListUsingGet({
  options,
}: {
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultListFriendVO>('/friend/list', {
    method: 'GET',
    ...(options || {}),
  });
}
